from libnum import *

c = 0x7a7e031f14f6b6c3292d11a41161d2491ce8bcdc67ef1baa9e
e = 0x872a335
A = 1285367317452089980789441829580397855321901891350429414413655782431779727560841427444135440068248152908241981758331600586
B = 1109691832903289208389283296592510864729403914873734836011311325874120780079555500202475594
C = gcd(A, B)
p = B//C
q = C//(1+p)
n = p*q
d = invmod(e, (p-1)*(q-1))
m = pow(c, d, n)
flag = n2s(m).decode()
print(flag) # flag{happy_rsa_1}